home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / process.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  4.6 KB  |  142 lines

  1. /* Definitions for asynchronous process control in XEmacs.
  2.    Copyright (C) 1985, 1992, 1993, 1994 Free Software Foundation, Inc.
  3.  
  4. This file is part of XEmacs.
  5.  
  6. XEmacs is free software; you can redistribute it and/or modify it
  7. under the terms of the GNU General Public License as published by the
  8. Free Software Foundation; either version 2, or (at your option) any
  9. later version.
  10.  
  11. XEmacs is distributed in the hope that it will be useful, but WITHOUT
  12. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14. for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with XEmacs; see the file COPYING.  If not, write to the Free
  18. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* Synched up with: FSF 19.28. */
  21.  
  22. #ifndef _XEMACS_PROCESS_H_
  23. #define _XEMACS_PROCESS_H_
  24.  
  25. #if defined (NO_SUBPROCESSES)
  26. #undef XPROCESS
  27. #undef CHECK_PROCESS
  28. #undef XSETPROCESS
  29. #define PROCESSP(x) 0
  30. #define Fprocess_status(x) Qnil
  31. #define Fget_process(x) Qnil
  32. #define Fget_buffer_process(x) Qnil
  33. #define kill_buffer_processes(x) 0
  34. #define close_process_descs() 0
  35. #define init_xemacs_process() 0
  36. extern void wait_without_blocking (void);
  37.  
  38. #else /* not NO_SUBPROCESSES */
  39.  
  40. /* Only process.c needs to know about the guts of this */
  41. struct Lisp_Process;
  42.  
  43. DECLARE_LRECORD (process, struct Lisp_Process);
  44. #define XPROCESS(x) XRECORD (x, process, struct Lisp_Process)
  45. #define XSETPROCESS(x, p) XSETRECORD (x, p, process)
  46. #define PROCESSP(x) RECORDP (x, process)
  47. #define CHECK_PROCESS(x, i) CHECK_RECORD (x, process)
  48.  
  49. #ifdef emacs
  50.  
  51. extern Lisp_Object Fget_process (Lisp_Object name);
  52. extern Lisp_Object Fget_buffer_process (Lisp_Object name);
  53. extern Lisp_Object Fprocessp (Lisp_Object object);
  54. extern Lisp_Object Fprocess_status (Lisp_Object process);
  55. extern Lisp_Object Fkill_process (Lisp_Object process, 
  56.                                   Lisp_Object current_group);
  57. extern Lisp_Object Fdelete_process (Lisp_Object process);
  58. extern Lisp_Object Fopen_network_stream_internal (Lisp_Object name,
  59.                           Lisp_Object buffer,
  60.                           Lisp_Object host,
  61.                           Lisp_Object service);
  62. extern Lisp_Object Fprocess_kill_without_query (Lisp_Object, Lisp_Object);
  63.  
  64. extern Lisp_Object connect_to_file_descriptor (Lisp_Object name,
  65.                            Lisp_Object buffer,
  66.                            Lisp_Object infd,
  67.                            Lisp_Object outfd);
  68. extern int connected_via_filedesc_p (struct Lisp_Process *p);
  69. extern void kill_buffer_processes (Lisp_Object buffer);
  70. extern void close_process_descs (void);
  71.  
  72. extern void set_process_filter (Lisp_Object proc,
  73.                 Lisp_Object filter, int filter_does_read);
  74.  
  75. /* True iff we are about to fork off a synchronous process or if we
  76.    are waiting for it.  */
  77. extern volatile int synch_process_alive;
  78.  
  79. /* Nonzero => this is a string explaining death of synchronous subprocess.  */
  80. extern CONST char *synch_process_death;
  81.  
  82. /* If synch_process_death is zero,
  83.    this is exit code of synchronous subprocess.  */
  84. extern int synch_process_retcode;
  85.  
  86.  
  87. extern void update_process_status (Lisp_Object p,
  88.                    Lisp_Object status_symbol,
  89.                    int exit_code, int core_dumped);
  90.  
  91. extern void get_process_file_descriptors (struct Lisp_Process *p,
  92.                       int *infd, int *outfd);
  93.  
  94. extern struct Lisp_Process *get_process_from_input_descriptor (int infd);
  95.  
  96. #ifdef HAVE_SOCKETS
  97. extern int network_connection_p (Lisp_Object process);
  98. #else
  99. #define network_connection_p(x) 0
  100. #endif
  101.  
  102. extern Lisp_Object Qrun, Qexit, Qopen, Qclosed;
  103.  
  104. /* Report all recent events of a change in process status
  105.    (either run the sentinel or output a message).
  106.    This is done while Emacs is waiting for keyboard input.  */
  107. extern void status_notify (void);
  108. extern void kick_status_notify (void);
  109.  
  110. extern void deactivate_process (Lisp_Object proc);
  111.  
  112. #ifdef VMS
  113. extern void create_process (Lisp_Object process, char **new_argv,
  114.                             CONST char *current_dir);
  115. #endif
  116.  
  117. extern void child_setup (int in, int out, int err, 
  118.                          char **new_argv, char **env,
  119.                          CONST char *current_dir);
  120.  
  121. extern Charcount read_process_output (Lisp_Object proc);
  122.  
  123. extern CONST char *signal_name (int signum);
  124.  
  125. #endif /* not NO_SUBPROCESSES */
  126.  
  127. /* The name of the file open to get a null file, or a data sink.
  128.    VMS, MS-DOS, and OS/2 redefine this.  */
  129. #ifndef NULL_DEVICE
  130. #define NULL_DEVICE "/dev/null"
  131. #endif
  132.  
  133. /* A string listing the possible suffixes used for executable files,
  134.    separated by colons.  VMS, MS-DOS, and OS/2 redefine this.  */
  135. #ifndef EXEC_SUFFIXES
  136. #define EXEC_SUFFIXES ""
  137. #endif
  138.  
  139. #endif /* emacs */
  140.  
  141. #endif /* _XEMACS_PROCESS_H_ */
  142.